package cn.edu.scau.cmi.linhongyu.simpleFactoryMethod;

import java.net.URL;
import java.util.ResourceBundle;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.TextArea;
import javafx.scene.control.TextField;


public class SimpleFactoryMethodController {

    @FXML
    private ResourceBundle resources;

    @FXML
    private URL location;

    @FXML
    private Button create;

    @FXML
    private TextField input;

    @FXML
    private TextField msg;

    @FXML
    private Label title;


    @FXML
    void initialize() {

    }
    @FXML
    void Even() {
    	MeatFactory meatFactory = new MeatFactory();
    	String text=input.getText();
    	int i = Integer.parseInt(text);
    	System.out.println(text);
    	
    	Meat meat = meatFactory.getMeat(i);
    	System.out.println(meat.getName());
    	msg.setText(meat.getName());
    }
}
